#!/usr/bin/make -f
#export DH_VERBOSE = 1

export PYBUILD_NAME=middlewared

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_build:
	dh_auto_build
	sqlite3 freenas-v1.db < middlewared/alembic/initial.sql
	cd middlewared && env PYTHONPATH=.. FREENAS_DATABASE=../freenas-v1.db alembic upgrade head

override_dh_install:
	dh_install
	mkdir -p debian/middlewared/data
	cp freenas-v1.db debian/middlewared/data/factory-v1.db

override_dh_auto_test:
